﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.WCS.Domain.EntityInfo;
using Zocono.WCS.Domain.PlcBytesObject;
using Zocono.WCS.Domain.PlcConnectPoolDomain;
using Zocono.WCS.Domain.PlcWriteBoMangeDomain;
using Zocono.WCS.Domain.ScGetWMSTaskDomain;
using Zocono.WCS.Infrastructure.ApllicationDto.WmsModel;

namespace Zocono.WCS.Application.AppPlcManage
{
    public class PlcWriteBoMange
    {
        private readonly IPlcWriteBoService _IPlcWriteBoService;

        public PlcWriteBoMange(IPlcWriteBoService iPlcWriteBoService)
        {
            _IPlcWriteBoService= iPlcWriteBoService;
        }


        public async Task<bool> WCSSetSCPLCAsync(ZJNScMessageWriteWcsActionBO wcsActionBO)
        {
            return  await _IPlcWriteBoService.WCSSetSCPLCAsync(wcsActionBO);
        }

        public async Task<bool> WCSSetPlanerPLCAsync(PlanarGeneralWriteWcsAction wcsActionBO)
        {
            return await _IPlcWriteBoService.WCSSetPlanerPLCAsync(wcsActionBO);
        }

        public async Task<bool> OperatePlanarPlcBoAsync(PlanarGeneralWriteWcsAction wcsActionBO)
        {
            return await _IPlcWriteBoService.OperatePlanarPlcBoAsync(wcsActionBO);
        }

        /// <summary>
        /// 分容柜门打开报警
        /// </summary>
        /// <param name="station"></param>
        /// <returns></returns>
        public async Task<bool> DoorOpenAlarmAsync(List<CapacityDoorOpen> capacityDoorOpen)
        {
            return await _IPlcWriteBoService.DoorOpenAlarmAsync(capacityDoorOpen);
        }


        public async Task<bool> WCSSetPlanerPLCWriteAsync(HynReturnState returnState)
        {
            return await _IPlcWriteBoService.WCSSetPlanerPLCWriteAsync(returnState);
        }
    }
}
